home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
printing
/
pfovbe
/
pfodll.bas
< prev
next >
Wrap
BASIC Source File
|
1995-04-25
|
5KB
|
106 lines
Option Explicit
'------------------------------------------------------------------------
'Constants
'PFOITEM.uiType
Global Const PFO_STRING = 0 'Don't use this type from VisualBasic!
Global Const PFO_BITMAP = 1
Global Const PFO_ICON = 2
Global Const PFO_FIXSTR = 3
Global Const PFO_BSTR = 4
'PFOITEM.uiAlignment
Global Const PFO_LEFT = 0
Global Const PFO_TOP = 0
Global Const PFO_CENTER = 1
Global Const PFO_RIGHT = 2
Global Const PFO_VCENTER = 4
Global Const PFO_BOTTOM = 8
Global Const PFO_SINGLELINE = 32
'------------------------------------------------------------------------
'Data Types
Type PFOITEM
uiVersion As Integer '&H0100&
uiYOffs As Integer 'vertical offset to top or bottom of previous item
uiXOffs As Integer 'absolute horizontal position
uiWidth As Integer 'width of this item, including borders
uiHeight As Integer 'height of this item, including borders
uiType As Integer 'PFO_STRING,...PFO_BSTR
uiHandle As Integer 'bitmap or icon handle
lpcstr As String 'String reference, fast, uiType must be PFO_BSTR!
acFixStr As String * 512 'char buffer with string, NULL terminated, slow
uiFontIdx As Integer 'index into font handle array
uiAlignment As Integer '0=Left,Top 1=Center 2=Right 4=VCenter 8=Bottom 32=SingleLine
bKeepYPos As Integer 'keep next object in same row as current one
bBorderLeft As Integer 'draw a left border
bBorderRight As Integer 'draw a right border
bBorderTop As Integer 'draw a top border
bBorderBottom As Integer 'draw a bottom border
bNewPage As Integer 'force a new page before this item
End Type
Type PFORECT
Left As Integer
Top As Integer
Right As Integer
Bottom As Integer
End Type
Type PFO
uiVersion As Integer '&H0100&
uiType As Integer 'current report type
rcPage As PFORECT 'size of the printed page, input to PfoInit
uiHeaderDY As Integer 'height of header area, input to PfoInit
uiFooterDY As Integer 'height of footer area, input to PfoInit
FontArray As Long 'font handle array, input to PfoInit
ItemArrayHeader As Long 'array of print items for header, input to PfoInit
ItemArrayFooter As Long 'array of print items for footer, input to PfoInit
ItemArrayBody As Long 'array of print items for body, input to PfoInit
PrntFrm As Long 'PrintForm object, result of PfoInit
uiPageToPrint As Integer 'input to PfoCanContinue and PfoPrint
bContinuePrinting As Integer 'output of PfoCanContinue
uiMaxPage As Integer 'output of PfoCanContinue and PfoPaginate
DC As Long 'device context, created in PfoPreparDC
rcPhysPage As PFORECT 'physical page, input to PfoPreparDC, PfoCanContinue and PfoPrint
End Type
'------------------------------------------------------------------------
'Font Array
Declare Function PfoFontArrayCreate Lib "pfoc.dll" (pPfoFontArray As Long) As Integer
Declare Function PfoFontArrayDestroy Lib "pfoc.dll" (pPfoFontArray As Long, ByVal bCleanUp As Integer) As Integer
Declare Function PfoFontArrayAdd Lib "pfoc.dll" (ByVal PfoFontArray As Long, ByVal hFont As Integer) As Integer
Declare Function PfoFontArrayGetCount Lib "pfoc.dll" (ByVal PfoFontArray As Long, uiCount As Integer) As Integer
Declare Function PfoFontArrayGetAt Lib "pfoc.dll" (ByVal PfoFontArray As Long, ByVal uiPos As Integer, phFont As Integer) As Integer
'------------------------------------------------------------------------
'Item Array
Declare Function PfoItemArrayCreate Lib "pfoc.dll" (pPfoItemArray As Long) As Integer
Declare Function PfoItemArrayDestroy Lib "pfoc.dll" (pPfoItemArray As Long) As Integer
Declare Function PfoItemArrayAdd Lib "pfoc.dll" (ByVal PfoItemArray As Long, pPfoItem As PFOITEM) As Integer
Declare Function PfoItemArrayGetCount Lib "pfoc.dll" (ByVal PfoItemArray As Long, uiCount As Integer) As Integer
Declare Function PfoItemArrayGetAt Lib "pfoc.dll" (ByVal PfoItemArray As Long, ByVal uiPos As Integer, pPfoItem As PFOITEM) As Integer
'------------------------------------------------------------------------
'Printing
Declare Function PfoInit Lib "pfoc.dll" (pPfo As PFO) As Integer
Declare Function PfoExit Lib "pfoc.dll" (pPfo As PFO) As Integer
Declare Function PfoCanContinue Lib "pfoc.dll" (pPfo As PFO) As Integer
Declare Function PfoPrepareDC Lib "pfoc.dll" (pPfo As PFO, ByVal hDC As Integer) As Integer
Declare Function PfoPaginate Lib "pfoc.dll" (pPfo As PFO) As Integer
Declare Function PfoPrint Lib "pfoc.dll" (pPfo As PFO) As Integer